import os
import django

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'application.settings')
django.setup()
from celery.utils.log import task_logger
from application.celery import app

logger = task_logger


@app.task
def sync_import(file_path):
    """
    运行方法
    sync_import.delay(file_path)
    """
    pass


if __name__ == '__main__':
    file_path = '目录'
    sync_import(file_path) # 测试
